package org.xiaojl.modules.info.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import org.xiaojl.utils.ToolUtil;
import com.baomidou.mybatisplus.annotations.TableName;
import org.xiaojl.common.base.BaseEntity;

/**
 * <p>
 * 信息公告表
 * </p>
 *
 * @author xiaojl
 * @since 2017-10-10
 */
@TableName("info_notices")
public class Notices extends BaseEntity<Notices> {

    private static final long serialVersionUID = 1L;

    /**
     * 标题
     */
	private String title;
	
    /**
     * 内容
     */
	private String content;
	
    /**
     * 备注
     */
	private String remark;
	


	@Override
	public Wrapper<Notices> bindingQueryWrapper() {
		Wrapper<Notices> wrapper = new EntityWrapper<Notices>();
		if(ToolUtil.isNotEmpty(this.title)){
			wrapper.like("title", this.title);
		}
		if(ToolUtil.isNotEmpty(this.content)){
			wrapper.like("content", this.content);
		}
		if(ToolUtil.isNotEmpty(this.remark)){
			wrapper.like("remark", this.remark);
		}
		if(ToolUtil.isNotEmpty(this.createTimeStart)){
			wrapper.gt("createTime", this.createTimeStart);
		}
		if(ToolUtil.isNotEmpty(this.createTimeEnd)){
			wrapper.lt("createTime", this.createTimeEnd);
		}
		return wrapper;
	}


	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}


	@Override
	public String toString() {
		return "Notices [ id=" + id 
				+ " title=" + title + ","
				+ " content=" + content + ","
				+ " remark=" + remark + ","
				+ " createBy=" + createBy + ", createTime=" + createTime
				+ ", delFlag=" + delFlag + ", createTimeStart="
				+ createTimeStart + ", createTimeEnd=" + createTimeEnd + "]";
	}

}
